﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Zcu.PanelComposer.ViewModels.Core;
using Zcu.PanelComposer.Interfaces;
using System.ComponentModel.Composition;
using Caliburn.Micro;

namespace Zcu.PanelComposer.ViewModels
{
    /// <summary>
    /// ViewModel pro rozcestnik.
    /// </summary>
    [Export(typeof(IModule))]
    public class HomeViewModel : NavigateScreen
    {
        #region Fields

        /// <summary>
        /// Reference na logger.
        /// </summary>
        private readonly ILog _log = LogManager.GetLog(typeof(HomeViewModel));

        #endregion // Fields

        #region Constructor

        /// <summary>
        /// Konstruktor ViewModelu, prednastaveni pocatecnich hodnot.
        /// Nazev stranky (titulek), nazev modulu (kvuli navigaci) a poradni v menu.
        /// </summary>
        public HomeViewModel()
        {
            /// todo do resources
            DisplayName = "Home";
            ModuleName = PageNames.Home;
            Order = 1;
        }

        #endregion // Constructor

        #region Public methods

        /// <summary>
        /// Akce, vyvolana stiskem tlacitka "New project".
        /// </summary>
        public void NewProjectAction()
        {
            Navigate(PageNames.NewProject);
        }

        /// <summary>
        /// Akce, vyvolana stiskem tlacitka "New solution".
        /// </summary>
        public void NewSolutionAction()
        {
            Navigate(PageNames.NewSolution);
        }

        /// <summary>
        /// Akce, vyvolana stiskem tlacitka "Existing Projects".
        /// </summary>
        public void ExistingProjectsAction()
        {
            Navigate(PageNames.ExistingProjects);
        }

        /// <summary>
        ///  Akce, vyvolana stiskem tlacitka "Existing Solutions".
        /// </summary>
        public void ExistingSolutionsAction()
        {
            Navigate(PageNames.ExistingSolutions);
        }

        #endregion // Public methods
    }
}
